<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="layui/css/layui.css">
    <script src="jquery.min.js"></script>

</head>
<body>
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
    <legend>添加账单</legend>
</fieldset>
<form class="layui-form" id="form" action="/tal/add" type="get">
<!--<form class="layui-form" onsubmit="return false" id="add" method="get">-->
    <div class="layui-form-item">
        <label class="layui-form-label">金额</label>
        <div class="layui-input-block">
            <input type="text" name="money" required  lay-verify="required" placeholder="请输入消费金额" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">单选框</label>
        <div class="layui-input-block">
            <input type="radio" name="type" value="收入" title="收入">
            <input type="radio" name="type" value="支出" title="支出" checked>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">描述</label>
        <div class="layui-input-block">
            <input type="text"name="des" required  lay-verify="required" placeholder="请输入消费详情" autocomplete="off" class="layui-input">
        </div>
    </div>

    <br>
    <hr>
    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn" type="submit" lay-filter="formDemo">立即提交</button>
            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
        </div>
    </div>

</form>

<script src="layui/layui.js"></script>
<script>
    //Demo
    layui.use(['form', 'laydate'], function(){
        var form = layui.form
            ,laydate = layui.laydate;
        form.render();

        laydate.render({
            elem: '#date' //指定元素
        });
    });
</script>
</body>
</html>